import * as ACCOUNTS from './accounts'

import localContractsConfig from './local/deployed_contracts.json'
import localTokensConfig from './local/tokens.json'

import natruelabContractsConfig from './naturelab/deployed_contracts.json'
import natruelabTokensConfig from './naturelab/tokens.json'

import fundList from './fundlist.json'

var DEPLOYED_CONTRACTS = {}
var TOKENS = {}

var WEB3_PROVIDER_HTTPS = process.env.WEB3_PROVIDER_HTTPS
var WEB3_PROVIDER_WSS = process.env.WEB3_PROVIDER_WSS
var USE_LOCAL_RPC = process.env.USE_LOCAL_RPC

if (USE_LOCAL_RPC) {
  DEPLOYED_CONTRACTS = localContractsConfig
  TOKENS = localTokensConfig
} else {
  DEPLOYED_CONTRACTS = natruelabContractsConfig
  TOKENS = natruelabTokensConfig
}
let FUNDS = fundList.funds

if (!FUNDS) {
  FUNDS = []
}

export {
  ACCOUNTS,
  DEPLOYED_CONTRACTS,
  TOKENS,
  WEB3_PROVIDER_HTTPS,
  WEB3_PROVIDER_WSS,
  USE_LOCAL_RPC,
  FUNDS,
}
